import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import path from 'path'

// 定义一个路径解析辅助函数
const resolvePath = (relativePath) => path.resolve(__dirname, relativePath);
export default defineConfig({
  plugins: [vue()],
  resolve: {
    alias: [
      { find: '@', replacement: resolvePath('src') },
    ],
    extensions: ['.js', '.ts', '.jsx', '.tsx', '.json', '.vue'],
  },
})
